﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RPGProject.GameWorld.GameObjects;
namespace RPGProject.LoopSystem
{
    /// <summary>
    /// Looper updating projectiles.
    /// </summary>
    class ProjectileLooper : Loop
    {
        /// <summary>
        /// Projectile to update.
        /// </summary>
        private Projectile proj;
        /// <summary>
        /// Basic contructor.
        /// </summary>
        /// <param name="proj"></param>
        /// <param name="lm"></param>
        public ProjectileLooper(Projectile proj, LoopManager lm) : base(lm, 10)
        {
            this.proj = proj;
            this.proj.Init();
        }
        /// <summary>
        /// Runs the projectile one frame.
        /// </summary>
        /// <returns></returns>
        public override FuncType RunOnce()
        {
            return this.proj.RunOnce();
        }
    }
}
